<template>
    <div>
        我是左侧导航组件
        <ul>
            <li v-for="item in nav" :key=item.id>
                <a href="" @click.prevent="handle(item.id)">{{ item.name }}</a>
            </li>
        </ul>
    </div>
</template>
<script>
export default {
    data() {
        return {
            nav:[{id:1,name:'111'},{id:2,name:'222'},{id:3,name:'333'}]
        }
    },
    methods: {
        handle(val){
            this.$emit('handle',val)
        }
    },
}
</script>